import instance from '@/utils/request'

// 面试经验相关API
export const interviewAPI = {
  // 获取经验列表
  getExperienceList(params) {
    return instance.get('/interview-experience', { params })
  },
  
  // 获取经验详情
  getExperienceDetail(id) {
    return instance.get(`/interview-experience/${id}`)
  },
  
  // 创建经验
  createExperience(data) {
    return instance.post('/interview-experience', data)
  },
  
  // 删除经验
  deleteExperience(id) {
    return instance.delete(`/interview-experience/${id}`)
  },
  
  // 获取评论列表
  getComments(experienceId) {
    return instance.get('/experience-comment', {
      params: { experience_id: experienceId }
    })
  },
  
  // 创建评论
  createComment(data) {
    return instance.post('/experience-comment', data)
  }
}

export default interviewAPI

